---
title: Memori Tools
---

## Code

```python cookbook/tools/memori_tools.py
from agno.agent import Agent
from agno.tools.memori import MemoriTools

agent = Agent(
    instructions=[
        "You are a memory-enhanced assistant with persistent conversation history",
        "Remember important information about users and their preferences",
        "Use stored memories to provide personalized and contextual responses",
    ],
    tools=[
        MemoriTools(database_connect="sqlite:///memori.db", namespace="quick-memori")
    ],
    markdown=True,
)

agent.print_response("Remember that I prefer vegetarian recipes and I'm learning to cook Italian cuisine")
```

## Usage

<Steps>
  <Snippet file="create-venv-step.mdx" />

  <Step title="Set your API key">
    ```bash
    export OPENAI_API_KEY=xxx
    ```
  </Step>

  <Step title="Install libraries">
    ```bash
    pip install -U memorisdk openai agno
    ```
  </Step>

  <Step title="Run Agent">
    <CodeGroup>
    ```bash Mac
    python cookbook/tools/memori_tools.py
    ```

    ```bash Windows
    python cookbook/tools/memori_tools.py
    ```
    </CodeGroup>
  </Step>
</Steps>
